Method for adapting a measured value of an air mass sensor

ABSTRACT

A method for adapting a measured value (MW 1 ) of an air mass sensor comprises the steps pf determining a correction value (KW) in the event of predetermined operating conditions (BB 1 ), namely depending on the measured value (MW 1 ) and a comparative value (VW) which in turn depends on at least one additional measured value (MW 2 ) of a second sensor. An adaptation value (AD 1 ) is adapted depending on the correction value (VW), on the duration (D_AD 1 ) since the last determination of the adaptation value (AD 1 ) and on the change of the adaptation value (AD 1 ) since the last adaptation of the adaptation value (AD 1 ). Subsequently measured values (MW 1 ) are corrected using the adaptation value (AD 1 ).

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a U.S. national stage application of InternationalApplication No. PCT/EP2005/050424 filed Feb. 1, 2005, which designatesthe United States of America, and claims priority to German applicationnumber DE 10 2004 005 134.8 filed Feb. 2, 2004, the contents of whichare hereby incorporated by reference in their entirety.

TECHNICAL FIELD

The invention relates to a method for adapting a measured value of anair mass sensor. The air mass sensor can in particular be arranged in aninternal combustion engine for recording an air mass flow in cylindersof the internal combustion engine.

BACKGROUND

These types of air mass sensor record the air mass flow which flows intoa collector. The collector communicates via induction tubes withcylinders of the internal combustion engine and supplies these withfresh air.

Ever more stringent legal requirements relating to pollutant emissionsin motor vehicles make it necessary to set the air/fuel mixture in theindividual cylinders of the internal combustion engine very precisely.This requires that the air mass drawn into the relevant cylinder isdetermined very precisely. The air mass sensor allows the air massflowing into the collector to be determined very precisely. By means ofcorresponding physical models of the collector and the induction tubesand of the induction behavior of the cylinders of the internalcombustion engine, the air mass flowing into the cylinders of theinternal combustion engine can be determined very precisely.

Known air mass measurers are regularly embodied in the form of aWhetstone bridge, with a high-resistance temperature-dependent resistorto compensate for the temperature of the induction air in one branch anda low-resistance temperature in the other branch of which the heatperformance is characteristic for the air mass flowing past. The heatingresistor is generally embodied as a so-called hot-film resistor. Duringthe operation of the internal combustion engine particles of dirt andalso oil droplets build up on the hot-film resistor. The result is thatthe behavior of the measuring resistor changes.

SUMMARY

The object of the invention is to create a method for adapting ameasured value of an air mass sensor that ensures precise measurementvalues of the air mass sensor simply and immediately over a longlifetime of the air mass sensor.

The outstanding feature of the invention is a method for adapting ameasured value of an air mass sensor, in which a correction value, ifpredefined operating conditions exist, is determined depending on themeasured value and a comparison value, which is determined depending onat least one further measured value of a further sensor. An adaptationvalue is adapted depending on the correction value, the duration sincethe adaptation value was last determined and on the change of theadaptation value since the last adaptation of the adaptation value.Measured values subsequently recorded are corrected with the adaptationvalue. The adaptation of the adaptation value, depending on the durationsince the adaptation value was last determined, can be ensured in that.Depending on the frequency of the adaptation of the adaptation value, avery precise learning of the adaptation value and thereby in the finalanalysis, correction of the measurement value can take place. The factthat the adaptation of the adaptation value is also dependent on theadaptation value since the last adaptation of the adaptation valueadditionally enables extraordinary changes of the air mass sensor to bedetected and correspondingly taken into account.

In an advantageous embodiment of the invention, as the duration sincethe last adaptation of the adaptation value increases, the adaptationvalue is adapted more heavily depending on the correction value. Thisenables account to be easily taken of the fact that, with a lessfrequent adaptation of the adaptation value, ageing effects of the airmass sensor are more marked and can thus be compensated for again by theheavier adaptation depending on the correction value.

In a further advantageous embodiment of the invention, when theadaptation value is changed, which is characteristic of an unauthorizedmodification to the air mass sensor, an initialization value is assignedto the adaptation value. This type of unauthorized modification to theair mass sensor can for example be the replacement of the air masssensor, without a control device which records and further processes themeasuring signals of the air mass sensor being informed. With a motorvehicle, this can for example be a replacement of the air mass sensoroutside a workshop authorized to carry out this work.

An unauthorized modification can be detected especially simply by anegative change of the adaptation value occurring, the amount of whichis greater than a predefined first threshold value, and a duration sincethe last determination of the correction being less that a predefinedsecond threshold value The duration can in this case especially simplybe a period of time, but it can also be dependent on the operating lifeof the air mass sensor and thus for example, for an internal combustionengine, be dependent on a specific number of driving cycles or adistance covered in the interim.

It is further especially advantageous, if an extraordinary contaminationof the air mass sensor is detected, and if this done when a positivechange of the adaptation value, of which the amount is greater than apredefined third threshold value, and a duration since the lastdetermination of the correction value which is less than a predefinedfourth threshold value are characteristic of an extraordinarycontamination of the air mass sensor. Then, if an extraordinarycontamination is detected there can simply be an error reaction.

Advantageously this error reaction is an indicator of an error whichoccurs so that a fault in a motor vehicle in which the air mass sensorcan be located recognizes that an error has occurred. The error can thusbe indicated visually or audibly for example.

It is also advantageous for at least one first correction value and asecond correction value to be determined. The first correction value isdetermined if predefined first operating conditions exist. The secondcorrection value is determined, if predefined second operatingconditions exist. Depending on the first correction value a firstadaptation value is adapted. Depending on the second correction value asecond adaptation value is adapted. Measured values of the air masssensor recorded subsequently are corrected with an adaptation valuewhich, depending on the current operating conditions, is interpolatedbetween the first and the second adaptation value. This enablesappropriately adapted adaptation values to be determined in a simplemanner for different operating conditions and used for furthercorrection of the measured values. If more than two correction valuesare determined, for corresponding predefined further operatingconditions, corresponding additional adaptation values are then alsoadapted and the adaptation value is then also corrected by interpolationbetween the first, second and further adaptation values. Thus, with agrowing number of adaptation values for different operating conditions,extremely precise correction of the measured value of the air masssensor can be guaranteed over a very wide operating range of the airmass sensor.

BRIEF DESCRIPTION OF THE DRAWINGS

Exemplary embodiments of the invention are explained below withreference to schematic diagrams. The figures show:

FIG. 1 an internal combustion engine with an air mass sensor,

FIG. 2A, 2B a flowchart of a first embodiment of a program for adaptingan adaptation value of an air mass sensor,

FIGS. 3A and 3B a further flowchart of a second embodiment of a programfor adapting a number of adaptation values and

FIG. 4 a flowchart of a program to perform the adaptation of themeasured values of the air mass sensor.

Elements for which the construction and function are the same arelabeled by the same reference symbols in all figures.

DETAILED DESCRIPTION

An internal combustion engine (FIG. 1) comprises an induction tract 1,an engine block 2, a cylinder head 3 and an exhaust gas tract 4. Theinduction tract 11 preferably comprises a throttle valve 12, also acollector 13 and an induction tube 1, which is routed through to thecylinder Z1 via an inlet channel in the engine block. Furthermore anexhaust gas recirculation device 13A can open out into the inductiontract 1, preferably in the area of the collector 12, which routesexhaust gases from the exhaust gas tract 4 back into the induction tract1. The volume of the recirculated exhaust gas can be controlled using anexhaust gas recirculation valve 13B. The engine block further comprisesa crankshaft 21, which is coupled via a connecting rod 25 to the piston24 of the cylinder Z1.

The cylinder head 3 comprises valve gear with an inlet valve 30, anexhaust valve 31 and valve actuating mechanisms 32, 33. The gas inletvalve 30 and the gas outlet valve 31 are driven in this case via acamshaft. The cylinder head 3 further includes an injection valve 34.

A control device 6 is also provided which can also be seen as a devicefor controlling the internal combustion engine and to which sensors areassigned which record different measurement variables and determine themeasured value of the measurement variable in each case. The controldevice 6 determines setpoint values depending on at least one of themeasurement variables, which are then converted into one or more controlsignals for controlling the actuation elements by means of theappropriate actuation drives.

The sensors are a pedal position sensor 71, which detects the positionof the gas pedal 7, an air mass measurer 14, which detects an air massflow upstream from the throttle valve 11, a temperature sensor 15 whichdetects the induction air temperature, a pressure sensor 16, whichdetects the induction tube pressure, a crankshaft angle sensor 22, whichdetects a crankshaft angle to which a speed N is then assigned, afurther temperature sensor 23, which detects a coolant temperature, acamshaft angle sensor 36 a , which detects the camshaft angle. Dependingon the form of embodiment of the invention, any given subset of the saidsensors or also additional sensors can be present.

The actuation elements are for example the throttle valve 11, the gasinlet and outlet valves 30, 31, the injection valve 34 and the exhaustgas recirculation valve 13B.

As well as the cylinder Z1 further cylinders Z2-Z4 are also provided towhich corresponding actuation elements are also assigned.

A program for determining an adaptation value which is stored in thecontrol device 6 is run during operation of the internal combustionengine. The program is started in a step S1 (FIG. 2A) in which variablesare initialized if necessary. The program is preferably started shortlyafter the beginning of the engine start sequence.

In a step S2 current operating conditions BB are determined. This ispreferably done depending on the speed N, the throttle setting THR, theinduction air temperature T and the exhaust gas recirculation rate EGRand where necessary also depending on further variables or alsodepending on just some of the specified variables.

A check is made in a step S3 as to whether the current operatingconditions BB are the same as predefined first operating conditions BB1.The predefined first operating conditions BB1 can for example be thatthe speed N has a value 1,000 RPM and the throttle setting, thetemperature T and the exhaust gas recirculation rate assume predefined,where possible constant values.

If the condition of step S3 is not fulfilled, processing is continued ata step S4 in which the program idles for a predefined waiting time T_W,before processing is continued again at step S2. If on the other handthe condition of step S3 is fulfilled, a first measured value MW1 isdetermined in a step S5. The first measured value MW1 is preferably themeasured value of the air mass sensor 14.

In a step S6 a comparison value VW is determined, and this value dependson at least a second measured value MW2 of a further sensor, of theinduction tube sensor 16 for example. Depending on the second measuredvalue MW2 the comparison value is then determined, for example using aphysical model, said value preferably being a comparison value of theair mass flow.

In a step S7 a first correction value KW1 is determined depending on thefirst measured value MW1 and the comparison value VW. This can forexample be done by forming the difference between the comparison valueVW and the first measured value MW1.

In a step S8 a first adaptation value AD1 is determined. An [n] in thiscase refers to the value actually computed and an [n-1] means a valuedetermined during the previous adaptation. The current first adaptationvalue AD1 is then determined depending on the previous first adaptationvalue AD1 and the first correction value KW1. This is preferably doneusing a first-order filter. It can however also be done using ahigher-order filter or in another way with which the person skilled inthe art is familiar.

In a step S10 a check is performed as to whether the first adaptationvalue AD1, which was currently determined is greater than a predefinedextreme value EXTR as regards its size The extreme value is predefinedso that if the extreme value is exceeded it can be assumed thatexceeding the value in this way is not possible because of theproperties of the air mass sensor and the signal processing and thatthereby a restriction to this value must be undertaken. For example theextreme value EXTR can amount to 10 to 20% of the comparison valuedetermined.

If the condition of step S10 is fulfilled, the in a step S11 the firstadaptation value AD1, depending on its leading sign, is restricted to aminimum value AD MIN or to a maximum value AD MAX.

If on the other hand the condition of step S10 is not fulfilled, then ina step S12 (FIG. 2B) in check is made as to whether the change of thefirst adaptation value AD1 which is determined by means of forming thedifference between the current and the preceding first adaptation valueAD1, is characteristic for an unauthorized modification of the air masssensor. The change of the first adaptation value AD1 is for examplecharacteristic of an unauthorized modification UM if it has a leadingsign which depends on the relevant air mass sensor and its amountexceeds and air mass sensor-dependent value and at the same time theduration since the previous adaptation is less than a predefined value.This type of unauthorized modification can arise for an air mass sensorfor example when the heating resistor embodied as a hot-film resistorhas been cleaned, but this information is not yet available to thecontrol device 6. If the condition of step S12 is fulfilled, then in astep S13 the first adaptation value AD1 is given an initialization valueAD1_INI for the first adaptation value AD1. This initialization valueAD1_INI can for example amount to zero.

If on the other hand the condition of step S12 is not fulfilled, then ina step S14 the first adaptation value AD1 is determined once again andthis time depending on the duration D_AD1 since the last validadaptation of the first adaptation value AD1, the preceding firstadaptation value AD1, that is not the first adaptation value AD1determined in step S8 during the current computation run of the program,and the correction value KW1. In this case account can be taken of thefact that as the duration D_AD1 since the last valid adaptation of thefirst adaptation value AD1 increases, especially if the correction valueKW1 exceeds a predefined value, the correction value KW1 plays a greaterrole in the adaptation of the first adaptation value AD1. This allowssimple account to be taken of the fact that if the operating point israrely reached at which the predefined first operating conditions BB1are fulfilled, but still if the allocation of the first adaptation valueAD1 has been undertaken, a correspondingly heavy adaptation of the firstadaptation value AD1 is undertaken and thereby a reduction of a possibleerror in the determination of the measured value and indeed of thecorrected measured value MW_KOR.

After step S14 the processing is continued at step S2.

A second embodiment of the program for adaptation of adaptation valuesis described below with reference to FIGS. 3A and 3B and the flowdiagrams shown in these figures. Only the differences from the programdepicted in FIGS. 2A and 2B are described below.

The program is started in a step S16 in which variables are initializedwhere necessary. In a step S18 the current operating conditionscorresponding to step S2 are determined. In a step S20 a check issubsequently performed as to whether the current operating conditions BBare the same as the predefined first operating conditions BB1, which forexample can essentially be defined by the speed and e.g. can befulfilled in relation to the speed if this as a value of around 1,000RPM.

If the condition of step S20 is fulfilled, then in a step S22 the firstmeasured value MW1 of the air mass sensor 14 is determined. In a stepS24 the comparison value VW is subsequently determined and this is donedepending on the second measured value MW2 of at least one furthersensor. This further sensor is preferably the induction tube sensor 16and accordingly a measured value of the induction tube pressure recordedby this sensor. In addition or as an alternative it can for example alsobe the crankshaft angle sensor which records the speed N of thecrankshaft and/or a sensor which records the throttle setting THR of thethrottle flap 11. Using a corresponding model the comparison value VW isthen determined from these second measured values MW2.

In a step S26 the first correction value KW1 is subsequently determineddepending on the first measured value MW1 and the comparison value. Thecomparison value VW is preferably considered in this case as thereference value, i.e. as the correct value. Thus in step S26 the firstcorrection value KW1 is preferably determined from the differencebetween the comparison value VW and the first measured value MW1.

In a step S28 a current first adaptation value AD1 is subsequentlydetermined, depending on the preceding first adaptation value AD1 andthe correction value KW1. This is preferably done in accordance withstep S8 by means of a first order filter. It can however also be doneusing a higher-order filter.

A check is made in a step S30 as to whether the amount of the firstadaptation value, and indeed of the current first adaptation value, isgreater than the extreme value EXTR. This is done in the same way as instep S10. If the condition of step S30 is fulfilled, processing iscontinued at a step S32 which corresponds to the step S11.

After step S32 processing of the program is continued at a step S18.

If the condition of step S30 is not fulfilled, then in a step S38 avalue is determined which is characteristic for the unauthorizedmodification UM to the air mass sensor, preferably the air mass sensor14. This is preferably done depending on the current first adaptationvalue AD1, the preceding first adaptation value AD1, a first thresholdvalue SW1, the duration D_AD1 since the last valid adaptation of thefirst adaptation value AD1 and a second threshold value SW2. In thiscase the unauthorized modification UM to the air mass sensor 14 hasoccurred if the difference between the current and the preceding firstadaptation value AD1, i.e. its change, is greater than the predefinedfirst threshold value SW1 and simultaneously the duration D_AD1 sincethe last valid adaptation of the first adaptation value AD1 is less thanthe predefined second threshold value SW2.

In a step S40 a check is subsequently made as to whether an unauthorizedmodification UM to the air mass sensor has occurred. If its has, in thestep S42 the current first adaptation value is set equal to theinitialization value AD1_INI of the first adaptation value AD1 and thisis done by using the initialization value AD1_INI of the firstadaptation value AD1. In addition, in the step S42, a second adaptationvalue AD2 is also initialized with an initialization value AD2_INI ofthe second adaptation value AD2. This then ensures that all adaptationvalues AD1, AD2 are able to be adapted again unaffected by the precedingcomputation cycles AD1, AD2, and account is thus taken of the situationin which the air mass sensor was modified, e.g. replaced.

In a step S44, if the condition of step S40 is not fulfilled, the firstadaptation value AD1 is determined again if necessary and this is donein accordance with step S14.

In a step S46 a check is then made as to whether the difference betweenthe current adaptation value AD1 and the preceding first adaptationvalue AD1 is greater than a third threshold value and simultaneously theduration D_AD1 since the last adaptation of the first adaptation valueAD1 is less than a predefined fourth threshold value SW4. If thecondition of step S46 is not fulfilled, processing is continued ifnecessary after the predefined waiting time T_W in step S18.

If the condition of step S46 is fulfilled however, an error has occurredand processing is continued at a step S48. An error is detected ifnecessary only after the condition of step S46 has been fulfilled anumber of times with consecutive calculation runs and an error reactionthen occurs which for example can entail the malfunction indicator lampMIL signaling an error to the driver of a motor vehicle in which the airmass sensor is located. Subsequently processing is continued ifnecessary after the predefined waiting time T_W, at step S18 again.

On the other hand, if the condition of step S20 is not fulfilled, i.e.the current operating conditions BB do not correspond to the predefinedfirst operating conditions BB1, then in a step S50 a check is made as towhether the current operating conditions BB correspond to predefinedsecond operating conditions BB2. The predefined second operatingconditions BB2 very much depend for example on the speed N and arefulfilled in this regard if the speed has a value of around 3000 RPM.

If the condition of step S50 is not fulfilled, processing is continuedat step S34. If the condition of step S50 is fulfilled however, then ina step S52 the first measured value MW1 of the air mass sensor 14 isrecorded.

In a step S54 the second measured value MW2 of the further sensor, thatis preferably of the induction tube pressure sensor 16, is subsequentlyrecorded and for example of the crankshaft angle sensor 22 and then,depending on this or these second measured value(s) MW2, the comparisonvalue VW is determined. This is done in the same way as in step S24 andstep S6.

In a step S56 a second correction value KW2 is subsequently determineddepending on the first measured value MW1 and the comparison value VWdetermined in step S52. This is done in the same way as in steps S26 andS7 by forming the difference.

In a step S58 the second adaptation value AD2 is adapted and this isdone depending on the second adaptation value AD2 and the secondcorrection value KW2 adapted in a preceding adaptation. This is alsodone in the same way as in step S28.

Subsequently a step S59 is processed which corresponds to the steps S32to S48 adapted for the determination of the second adaptation value AD2,with then, in accordance with the duration D_AD1 since the last validadaptation of the first adaptation value AD1 by a duration D_AD2, theduration since the last valid adaptation of the second adaptation valueAD2, of the first correction value KW1 is replaced by the secondcorrection value KW2. In addition the program can also becorrespondingly tailored for adaptation of further adaptation values ifthird, fourth and further predefined operating conditions exist. Theprogram depicted in FIGS. 3A, 3B can however also be correspondinglytailored merely for determining the first adaptation value AD1.

FIG. 4 shows a flowchart of a program by means of which the measuredvalues MW1 of the air mass sensor 14 are corrected. The program isstarted in a step S60.

In a step S62 the current operating conditions BB are determined andthis is done in the same way as in step S18. Where necessary the currentoperating conditions can be determined in step S62 that is onlydepending on one or more decisive measured values, thus for examplemerely depending on the speed N. In a step S66 the current adaptationvalue AD is then determined depending on the operating conditions BBdetermined in the step S62 and corresponding interpolation between theadaptation value or adaptation values AD1, AD2 determined and wherenecessary further variables.

In a step S66 the first measured value MW1 is then determined. In a stepS68 a corrected first measured value MW_KOR is then determined bysumming the first measured value MW1 and the current adaptation valueAD. Subsequently the program idles for a predefined waiting time T_W inthe step S70 before processing is continued again at step S62.

The adaptation value or adaptation values are basically stored and arethus available once more for each new start of the program.

1. A method for adapting a measured value of an air mass sensor,comprising the steps of: determining a correction value, if predefinedoperating conditions exist, depending on the measured value and acomparison value which is determined depending on at least one furthermeasured value of a further sensor, checking and adapting an adaptationvalue depending on the correction value, on the duration since the lastadaptation of the adaptation value, and on the change in the adaptationvalue since the last adaptation of the adaptation value, and correctingmeasured values subsequently recorded with the adaptation value.
 2. Amethod according to claim 1, wherein, as the duration since the lastadaptation of the adaptation value increases, the adaptation value isadapted more heavily depending on the correction value.
 3. A methodaccording to claim 1, wherein, for a change in the adaptation value,which is characteristic for an unauthorized modification to the air masssensor, the adaptation value is assigned an initialization value.
 4. Amethod according to claim 3, wherein a negative change of the adaptationvalue, of which the amount is greater than a predefinable firstthreshold value, and a duration since the last determination of thecorrection value, which is less than a predefined second thresholdvalue, are characteristic of the unauthorized modifications to the airmass sensor.
 5. A method according to claim 1, wherein a positive changeto the adaptation value, of which the amount is greater than apredefinable first threshold value, and a duration since the lastdetermination of the correction value, which is less than a predefinedsecond threshold value, are characteristic of an extraordinarycontamination of the air mass sensor, and in which an error reactionoccurs on detection of an extraordinary contamination.
 6. A methodaccording to claim 5, wherein the error reaction is an indication of anerror, which occurs so that the driver of a motor vehicle in which theair mass sensor can be located recognizes that an error has occurred. 7.A method according to claim 1, wherein at least a first correction valueand a second correction value are determined, wherein the firstcorrection value is determined if predefined first operating conditionsexits, and the second correction value is determined if predefinedsecond operating conditions exist, and wherein, depending on the firstcorrection value a first adaptation value is checked and adapted, anddepending on the second correction value a second adaptation value ischecked and adapted and measured values of the air mass sensorsubsequently recorded are corrected with an adaptation valueinterpolated, depending on the current operating conditions, between theat least first and second adaptation value.
 8. A method for adapting ameasured value of an air mass sensor comprising the steps of:determining a comparison value depending on at least one furthermeasured value of a further sensor, determining a correction valuedepending on the measured value and the comparison value, checking andadapting an adaptation value depending on the correction value, on theduration since the last adaptation of the adaptation value, and on thechange in the adaptation value since the last adaptation of theadaptation value, and correcting measured values subsequently recordedwith the adaptation value.
 9. A method according to claim 8, wherein, asthe duration since the last adaptation of the adaptation valueincreases, the adaptation value is adapted more heavily depending on thecorrection value.
 10. A method according to claim 8, wherein for achange in the adaptation value, which is characteristic for anunauthorized modification to the air mass sensor, the adaptation valueis assigned an initialization value.
 11. A method according to claim 10,wherein a negative change of the adaptation value, of which the amountis greater than a predefinable first threshold value, and a durationsince the last determination of the correction value, which is less thana predefined second threshold value, are characteristic of theunauthorized modification to the air mass sensor.
 12. A method accordingto claim 8, wherein a positive change to the adaptation value, of whichthe amount is greater than a predefinable first threshold value, and aduration since the last determination of the correction value, which isless than a predefined second threshold value, are characteristic of anextraordinary contamination of the air mass sensor, and in which anerror reaction occurs on detection of an extraordinary contamination.13. A method according to claim 12, wherein the error reaction is anindication of an error, which occurs so that the driver of a motorvehicle in which the air mass sensor can be located recognizes that anerror has occurred.
 14. A method according to claim 8, wherein at leasta first correction value and a second correction value are determined,wherein the first correction value is determined if predefined firstoperating conditions exits, and the second correction value isdetermined if predefined second operating conditions exist, and wherein,depending on the first correction value a first adaptation value ischecked and adapted, and depending on the second correction value asecond adaptation value is checked and adapted and measured values ofthe air mass sensor subsequently recorded are corrected with anadaptation value interpolated, depending on the current operatingconditions, between the at least first and second adaptation value.